﻿{include file="public/header" /}
{css href="__ROOT__/static/public/umeditor/themes/default/css/umeditor.css" /}
{js href="__ROOT__/static/public/umeditor/third-party/template.min.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.config.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.min.js" /}
	<form method="post" class="form-x" action="{if $data.id}?id={$data.id}{/if}">
	<div class="panel admin-panel">
		<div class="panel-head"><strong>{:lang('currency')['edit']}</strong></div>
		<br/>
		<script>
			//city canshu
			var pid='{$data.pid}';
			var cid='{$data.cid}';
			var aid='';
			var selectc=true;
			var selecta=true;
		</script>
		<div class="form-group">
			<div class="label">
				<label for="name">{:lang('currency')['city']}</label>
			</div>
				<div class="field">
				{include file="public/city" /}
				</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="name">{:lang('label')['name']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="name" name="name" value="{$data.name}" size="80" placeholder="{:lang('label')['name']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="phone">{:lang('label')['phone']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="phone" name="phone" value="{$data.phone}" size="80" placeholder="{:lang('label')['phone']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="password">{:lang('label')['password']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="password" name="password" value="" size="80" placeholder="{:lang('label')['password']}" {if !$data.id}data-validate="required:{:lang('currency')['required']}"{/if} />
			</div>
		</div>
		<div class="form-group">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="headimg">{:lang('label')['headimg']}</label>
			</div>
			<div class="field">
				<input type="text" readonly class="input input-auto" id="headimg" name="headimg" value="{$data.headimg}" size="65" placeholder="{:lang('label')['headimg']}" data-validate="required:{:lang('currency')['required']}" />
				<span class="addbtn"><button type="button" data-id="headimg" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label>{:lang('label')['status']}</label>
			</div>
			<div class="field">
				<div class="button-group button-group-small radio">
					<label class="button {if $data.status == "1" || !$data.status}active{/if}">
						<input name="status" value="1" {if $data.status == "1" || !$data.status}checked="checked"{/if} type="radio"><span class="icon icon-check"></span> {:lang('currency')['status_1']}</label>
					<label class="button {if $data.status == "2"}active{/if}">
						<input name="status" value="2" {if $data.status == "2"}checked="checked"{/if} type="radio"><span class="icon icon-times"></span> {:lang('currency')['status_2']}</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="idcard">{:lang('label')['idcard']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="idcard" name="idcard" value="{$data.idcard}" size="80" placeholder="{:lang('label')['idcard']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="form-group">
			<div class="input-inline clearfix">
				<div class="label">
					<label for="idcardimg">{:lang('label')['idcardimg']}</label>
				</div>
				<div class="field">
					<input type="text" readonly class="input input-auto" id="idcardimg" name="idcardimg" value="{$data.idcardimg}" size="65" placeholder="{:lang('label')['idcardimg']}" data-validate="required:{:lang('currency')['required']}" />
					<span class="addbtn"><button type="button" data-id="idcardimg" class="button upload">{:lang('form')['file']}</button></span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="introduce">{:lang('label')['seller']}{:lang('label')['introduce']}</label>
			</div>
			<div class="field">
				<script data-validate="required:{:lang('currency')['required']}" type="text/plain" name="introduce" id="myEditor" style="width:1000px;height:240px;">{$data.introduce} </script>
			</div>
		</div>
		<div id="refuse" class="form-group{if $data.status != '2'} hidden {/if}">
			<div class="label">
				<label for="refuse">{:lang('label')['refuse']}</label>
			</div>
			<div class="field">
				<textarea name="refuse" class="input input-auto" rows="5" cols="80" placeholder="{:lang('label')['refuse']}" data-validate="required:{:lang('currency')['required']}">{$data.refuse}</textarea>
			</div>
		</div>
		<div class="form-button">
			<button class="button bg-main" type="submit">{:lang('form')['submit']}</button>
		</div>
		<br/>
		</div>
	</form>
	<script>
		$("[name='status']").click(function(){
			var status = $("[name='status']:checked").val();
			if(status=='1'){
				$("#refuse").addClass('hidden');
			}else{
				$("#refuse").removeClass('hidden');
			}
		});
		var um = UM.getEditor('myEditor');
		
	</script>
{include file="public/footer" /}